/**
 * @description 模拟获取订单详情的接口
 * @param {object} params - 请求参数，可以从 query 中获取 id 和 orderType
 */
module.exports = function (params) {
    const { query } = params;
    const isTrial = query.orderType === 'TRIAL';

    // 模拟的枚举数据
    const MOCK_DATA = {
        ORDER_TYPE: { TRIAL: '体验订单', RECHARGE: '充值订单' },
        ORDER_STATUS: { SUCCESS: '支付成功', PENDING: '待支付', FAILED: '支付失败' },
        PAYMENT_METHOD: { ZNB: '智牛币', OFFLINE: '线下支付', WECHAT: '微信' },
    };

    const detail = {
        id: query.id,
        studentName: '张三（Mock）',
        createTime: '2025-07-13 20:23:34',
        orderNo: isTrial ? 'T202507181634999999' : 'R202507181634999999',
        orderType: MOCK_DATA.ORDER_TYPE[query.orderType || 'RECHARGE'],
        orderStatus: MOCK_DATA.ORDER_STATUS.SUCCESS,
        orderAmount: isTrial ? 1.00 : 10000.00,
        paymentMethod: isTrial ? MOCK_DATA.PAYMENT_METHOD.ZNB : MOCK_DATA.PAYMENT_METHOD.OFFLINE,
        lastOpTime: '2025-07-13 20:23:34',
        operator: '李四',
        remark: '这是一个通过 Mock 接口获取的备注信息。',
        paymentGatewayOrderNo: '34567899876234567834',
        paymentScreenshot: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
        rechargeHours: 100,
        consumedHours: 50,
        refundedHours: 10,
        remainingHours: 40,
        receiverCompanyName: '智牛（上海）教育科技有限公司',
        receiverCompanyAccount: '6222020200029999888',
        paymentDate: '2025-07-14',
        payerName: '王五',
    };

    return {
        code: 0,
        message: '请求成功',
        data: detail,
    };
}
